package com.wp.design.create.prototype.deepClone;

import java.util.Date;

public class Test {
	public static void main(String[] args) throws CloneNotSupportedException {
		Date birthday = new Date(0L);
		Pig pig1 = new Pig("佩奇",birthday);
		Pig pig2 = (Pig)pig1.clone();
		pig2.setName("小猪");
		pig2.setBirthday(new Date(9599999));
		System.out.println(pig1);
		System.out.println(pig2);
	}


}
